
<div class="module clearfix">
	
	</div>
	<div>

			<div class="panel-body">
<?php
				if($this->session->flashdata('message'))
				{
					$msg = $this->session->flashdata('message');
					echo  $this->session->flashdata('message');
				}
				?>
				<div class="col-xs-9 clearfix">
					
					
					<form class="form-horizontal" method="POST"
						action="<?= base_url();?>member/profile/update">
						<input type="hidden"
					name="<?php echo $this->security->get_csrf_token_name(); ?>"
					value="<?php echo $this->security->get_csrf_hash();?>" />
						
						<div class="form-group">
							<label class="col-sm-3 control-label">Full Name</label>
							<div class="col-sm-8">
							<span class="text text-danger"> <?php echo form_error('full_name'); ?>
							</span> 
								<input type="text" name="full_name" id="full_name" class="form-control"
									placeholder="Full Name" value="<?= $profile['name'];?>">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">Email</label>
							<div class="col-sm-8">
								<input type="email" name="email" id="email" class="form-control"
									placeholder="Email" value="<?= $profile['email'];?>" disabled="disabled" title="You can't edit your mail id">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">Gender</label>
							
							<div class="col-sm-5 ">
							<select class="form-control" name="gender" id="gender">
								<option value="" selected="selected">--Select Gender--</option>
								<option value="Male" <?php if($profile['gender'] == 'Male') echo "selected='selected'";?>>Male</option>
								<option value="Female" <?php if($profile['gender'] == 'Female') echo "selected='selected'";?>>Female</option>
								
							</select>
					
							
								
							</div>
						</div>
				<!-- For Date Of Birth
					<div class="form-group">
							<label class="col-sm-3 control-label">Date Of Birth</label>
							
							<div class="input-group date col-sm-5" id='datetimepicker5' data-date-format="YYYY/MM/DD">
					
                        	<input type="text" class="form-control" name="birthdate" placeholder="Date of Birth"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
     
									
							
								
							</div>
						</div>
					 -->	
						
						
						<div class="form-group">
							<label class="col-sm-3 control-label">Region</label> <span
						id="alert"></span>
							
							<div class="col-sm-5 ">
							<select class="form-control" name="region" id="region">
								<option value="" selected="selected">--Select Region--</option>
								<?php foreach($region as $region):?>
								<option value="<?= $region->id;?>"
								<?php if($region->id == $profile['region']){echo "selected=selected";}?>>
									<?= $region->name;?>
								</option>
								<?php endforeach;?>
							</select>
							
					
							
								
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">City</label>
							
							<div class="col-sm-5 ">
							<select class="form-control" name="city" id="city">
								<option value="" selected="selected">--Select City--</option>
								<?php foreach($city as $city):?>
								<option value="<?= $city->id;?>"
								<?php if($city->id == $profile['city']){echo "selected=selected";}?>>
									<?= $city->name;?>
								</option>
								<?php endforeach;?>
							</select>
							
					
							
								
							</div>
						</div>
					<div class="form-group">
							<label class="col-sm-3 control-label">Phone No</label>
							
							<div class="col-sm-5 ">
							<input type="text" name="phone_no" id="phone_no" class="form-control"
									placeholder="Phone No" value="<?= $profile['phone_no']?>" >
					
							
								
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-offset-3 col-sm-9">
								<button type="submit" class="btn btn-info" <?php if($this->config->item('mode')=='DEMO'){?>onclick="alert ('Sorry! Not allowed in Demo mode '); return false;" <?} else?>onclick="return confirm('Are you sure ?');" >Update Profile</button>
								
								
							</div>
						</div>
					</form>
				</div>

			</div>
			</div>
			
		       
 <!--      
<script type="text/javascript">
        $('.input-group.date').datepicker({
            format: "yyyy/mm/dd",
            startDate: "2012-01-01",
            endDate: "2015-01-01",
            todayBtn: "linked",
            autoclose: true,
            todayHighlight: true
        });
        </script>
-->	